home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime for java / custommedia / src / com / vr / vrmedia.java next >
Encoding:
Java Source  |  2000-09-28  |  2.5 KB  |  77 lines

  1. /*
  2.  * QuickTime for Java SDK Sample Code
  3.  
  4.    Usage subject to restrictions in SDK License Agreement
  5.  * Copyright: © 1996-1999 Apple Computer, Inc.
  6.  
  7.  */
  8. package com.vr;
  9.  
  10. import quicktime.std.movies.media.*;
  11. import quicktime.std.StdQTException;
  12. import quicktime.std.movies.Track;
  13. import quicktime.QTException;
  14. import java.util.*;
  15. /** Represents VR Media - this is an example of how to subclass GenericMedia
  16.  * to return a Media object of a subclass that corresponds to the Media Type.
  17.  */
  18. public class VRMedia extends GenericMedia {
  19.     public static void registerMediaType () {
  20.         Media.addMediaType (vrMediaOSType, "com.vr.VRMedia");
  21.     }
  22.     
  23.         // 0x5354706e is the OSType for a panorama media type
  24.     private static final int vrMediaOSType = 0x5354706e;
  25. //_________________________ CLASS METHODS
  26.     public VRMedia (Integer v) throws QTException {
  27.         super (v);
  28.     }    //must have a default constructor for the makeMedia call
  29.     /**
  30.     * This constructor creates a media struct for the specified Track object.
  31.     * <BR><BR><b>QuickTime::NewTrackMedia()</b><BR><BR>
  32.     * @param itsTrack Specifies the Track object this media belongs to.
  33.     * @param timeScale Specifies the time scale of the new media.
  34.     * @param dataRef a DataRef object specifying the default data reference for this media.
  35.     */
  36.     public VRMedia (Track itsTrack, int timeScale, DataRef dataRef) throws QTException {
  37.         super (itsTrack, timeScale, dataRef, vrMediaOSType);
  38.     }
  39.  
  40.     /**
  41.     * This constructor creates a media struct for the specified Track object.
  42.     * <BR><BR><b>QuickTime::NewTrackMedia()</b><BR><BR>
  43.     * @param itsTrack Specifies the Track object this media belongs to.
  44.     * @param timeScale Specifies the time scale of the new media.
  45.     */
  46.     public VRMedia(Track itsTrack, int timeScale) throws QTException {
  47.         this (itsTrack, timeScale, null);
  48.     }
  49.             
  50. //_________________________ INSTANCE METHODS
  51. }
  52.  
  53. /*
  54.  * $Log: /Biscotti/QTJavaDemos/CustomMedia/src/com/vr/VRMedia.java $
  55.  * 
  56.  * 7     3/11/99 5:32 PM Roger Smith
  57.  * Update Source License Agreement
  58.  * 
  59.  * 6     22/9/98 4:51 PM Bill Stewart
  60.  * update
  61.  * 
  62.  * 3     6/30/98 11:57 PM Roger Smith
  63.  * change com.qt to quicktime to reflect new package naming scheme
  64.  * 
  65.  * 2     16/6/98 5:20 PM Bill Stewart
  66.  * changes to GenericMedia
  67.  * 
  68.  * 1     29/4/98 3:11 PM Bill Stewart
  69.  * Adding subproject 'QTJavaDemos' to '$/Biscotti'
  70.  * 
  71.  * 1     22/4/98 5:46 PM Bill Stewart
  72.  * Adding subproject 'QTJavaDemos' to '$/Biscotti'
  73.  * 
  74.  * 1     15/4/98 6:49 PM Bill Stewart
  75.  * Adding subproject 'VR Media' to '$/Biscotti/Projects'
  76.  */
  77.